package cn.com.dhcc.ddi.datamapping.vo;

import cn.com.dhcc.app.core.annotation.SiColumn;
import cn.com.dhcc.app.core.annotation.SiNotDbColumn;
import cn.com.dhcc.app.core.annotation.SiTable;
import cn.com.dhcc.app.core.base.ModuleFeatureBean;

import java.util.Date;

/**
 * 函数关系表
 *
 * @日期：2016/12/1 15:16
 * @作者：张洪涛
 * @版权所有：东华软件
 * @版本：1.0
 */
@SiTable(name = "t_ddi_function_mapping")
public class FuncMapping extends ModuleFeatureBean {
    @SiColumn(isId = true)
    private String id;
    @SiColumn(name = "mapping_id")
    private String mappingId;//数据映射id
    @SiColumn(name = "table_name")
    private String tableName;//所属表,如果为空，并且作用对象是表名，则表示批量修改表名
    @SiColumn(name = "act_obj")
    private String actObj;//作用对象，表名，字段名
    @SiColumn(name = "fx_id")
    private String fxId;//函数id

    @SiColumn(name = "arg_content")
    private String argContent;//参数内容：json

    @SiColumn(name = "fx_act_on_type")
    private String fxActOnType;//函数作用对象类型：1表名、2字段名、3字段值

    @SiColumn(name = "fx_exec_order")
    private int fxExecOrder;//执行顺序

    private Date mtime;//最后修改时间


    @SiNotDbColumn
    private String fxNameEn;//函数英文名
    @SiNotDbColumn
    private FuncIdentify funcIdentify;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getMappingId() {
        return mappingId;
    }

    public void setMappingId(String mappingId) {
        this.mappingId = mappingId;
    }

    public String getTableName() {
        return tableName;
    }

    public void setTableName(String tableName) {
        this.tableName = tableName;
    }

    public String getFxId() {
        return fxId;
    }

    public void setFxId(String fxId) {
        this.fxId = fxId;
    }

    public String getArgContent() {
        return argContent;
    }

    public void setArgContent(String argContent) {
        this.argContent = argContent;
    }

    public String getFxActOnType() {
        return fxActOnType;
    }

    public void setFxActOnType(String fxActOnType) {
        this.fxActOnType = fxActOnType;
    }

    public int getFxExecOrder() {
        return fxExecOrder;
    }

    public void setFxExecOrder(int fxExecOrder) {
        this.fxExecOrder = fxExecOrder;
    }

    public Date getMtime() {
        return mtime;
    }

    public void setMtime(Date mtime) {
        this.mtime = mtime;
    }

    public String getFxNameEn() {
        return fxNameEn;
    }

    public void setFxNameEn(String fxNameEn) {
        this.fxNameEn = fxNameEn;
    }

    public String getActObj() {
        return actObj;
    }

    public void setActObj(String actObj) {
        this.actObj = actObj;
    }

    public FuncIdentify getFuncIdentify() {
		return funcIdentify;
	}

	public void setFuncIdentify(FuncIdentify funcIdentify) {
		this.funcIdentify = funcIdentify;
	}


	//函数作用对象类型
    public enum ACT_TYPE {
        ON_TABLE("表名", "1"),
        ON_COLUMN("字段名", "2"),
        ON_VALUE("字段值", "3");
        private String name;
        private String code;

        ACT_TYPE(String name, String code) {
            this.name = name;
            this.code = code;
        }

        public String getName() {
            return name;
        }

        public String getCode() {
            return code;
        }
    }

}
